using System.Collections.Generic;
using eBookDirectory.Common.Dtos;
using eBookDirectory.Common.ServiceContracts;
using eBookDirectory.Infrastructure.Repository;
using eBookDirectory.Service.Entities;

namespace eBookDirectory.Service.Services
{
    public class BookService : IBookService
    {
        public IRepositoryLocator Repository { get; set; }

        public BookDto CreateNewCustomer(BookDto dto)
        {
            var customer = Book.Create(Repository, dto);
            return new BookDto
            {
                Id = customer.Id,
                Name = customer.Name,
                Description = customer.Description
            };
        }

        public BookDto GetById(long id)
        {
            throw new System.NotImplementedException();
        }

        public BookDto UpdateCustomer(BookDto customer)
        {
            throw new System.NotImplementedException();
        }

        public List<BookDto> FindAll()
        {
            throw new System.NotImplementedException();
        }
    }
}